/**
 * Witontek.com.
 * Copyright (c) 2012-2018 All Rights Reserved.
 */
package pattern.observer;

/**
 * 
 * @author Long
 * @version $Id: ObserverPatternDemo.java, v 0.1 2018年1月15日 上午10:40:16  xiaolong.ma  Exp $
 */
public class ObserverPatternDemo {
    public static void main(String[] args) {
        Subject subject = new Subject();

        new HexaObserver(subject);
        new OctalObserver(subject);
        new BinaryObserver(subject);

        System.out.println("First state change: 15");
        subject.setState(15);
        System.out.println("Second state change: 10");
        subject.setState(10);
    }
}
